QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Markers

A marker is a two-dimensional object typically used to indicate the position of an object (or part of an object) in a window. QuickDraw 3D provides two types of markers, bitmap markers and pixmap markers. A bitmap marker is defined by the TQ3MarkerData data type, which contains a bitmap and a location, together with an optional set of attributes. A pixmap marker is defined by the TQ3PixmapMarkerData data type, which contains a pixmap and a location, together with an optional set of attributes.

The bitmap or pixmap specifies the image that is to be drawn on top of a rendered scene at the specified location. The marker is drawn perpendicular to the viewing vector, aligned with the window, with its origin located at the specified location. A marker is always drawn with the same size, no matter which rotations, scalings, or other transformations might be active. Figure 37 shows a bitmap marker.

Figure 37 A marker

typedef struct TQ3MarkerData {
    TQ3Point3D                          location;
    long                                xOffset;
    long                                yOffset;
    TQ3Bitmap                           bitmap;
    TQ3AttributeSet                     markerAttributeSet;
} TQ3MarkerData;
location
The origin of the marker.
xOffset
The number of pixels, in the horizontal direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
yOffset
The number of pixels, in the vertical direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
bitmap
A bitmap. Each bit of this bitmap corresponds to a pixel in the rendered image.
markerAttributeSet
A set of attributes for the marker. You can use these attributes to specify the color, transparency, or other attributes of the bits in bitmap that are set to 1. The value in this field is NULL if no marker attributes are defined.
typedef struct TQ3PixmapMarkerData {
    TQ3Point3D                          position;
    long                                xOffset;
    long                                yOffset;
    TQ3StoragePixmap                    pixmap;
    TQ3AttributeSet                     pixmapMarkerAttributeSet;
} TQ3PixmapMarkerData;
position
The origin of the marker.
xOffset
The number of pixels, in the horizontal direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
yOffset
The number of pixels, in the vertical direction, by which to offset the upper-left corner of the marker from the origin specified in the location field.
pixmap
A storage pixmap. Each bit of this pixmap corresponds to a pixel in the rendered image.
pixmapMarkerAttributeSet
A set of attributes for the marker. The value in this field is NULL if no marker attributes are defined.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |